import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/login/Index.vue'
const routes = [
    {
        path: '/',
        redirect: '/baseInfo',
        name: 'Home',
        component: Home,
        children: [
            {
                path: 'baseInfo',
                name: 'baseInfo',
                component: () => import('../views/baseInfos/baseInfo.vue')
            }  
        ]
    },
    {
        path: '/login',
        name: 'Login',
        component: Login,
    },
    
    {
        path: '/custom',
        redirect: '/custom/list',
        component: Home,
        children: [
            {
                path: 'index',
                name: 'customIndex',
                component: () => import('../views/custom/index.vue')
            },
            {
                path: 'chart',
                name: 'chart',
                component: () => import('../views/chart/index.vue'),
            },
        ]
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
